package utils

import "time"

type QldOutlet struct {
	Id            int64     `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
	AreaId        int64     `gorm:"column:area_id;type:bigint(20);default:0;NOT NULL" json:"area_id"`
	SnNum         string    `gorm:"column:sn_num;type:varchar(60)" json:"sn_num"`
	UserId        int64     `gorm:"column:user_id;type:bigint(20)" json:"user_id"`
	PriceId       int64     `gorm:"column:price_id;type:bigint(20)" json:"price_id"`
	ControlId     int64     `gorm:"column:control_id;type:bigint(20)" json:"control_id"`
	ExtraId       int64     `gorm:"column:extra_id;type:bigint(20)" json:"extra_id"`
	Name          string    `gorm:"column:name;type:varchar(255)" json:"name"`
	Address       string    `gorm:"column:address;type:varchar(255)" json:"address"`
	Lat           float64   `gorm:"column:lat;type:decimal(14,8)" json:"lat"`
	Lng           float64   `gorm:"column:lng;type:decimal(14,8)" json:"lng"`
	AddBy         int64     `gorm:"column:add_by;type:bigint(20)" json:"add_by"`
	AddDate       time.Time `gorm:"column:add_date;type:datetime" json:"add_date"`
	PublishBy     int64     `gorm:"column:publish_by;type:bigint(20)" json:"publish_by"`
	PublishDate   time.Time `gorm:"column:publish_date;type:datetime" json:"publish_date"`
	RecallBy      int64     `gorm:"column:recall_by;type:bigint(20)" json:"recall_by"`
	RecallDate    time.Time `gorm:"column:recall_date;type:datetime" json:"recall_date"`
	Voltage       int       `gorm:"column:voltage;type:int(11)" json:"voltage"`
	Current       int       `gorm:"column:current;type:int(11)" json:"current"`
	Status        int       `gorm:"column:status;type:tinyint(4);comment:0 : 正常状态  1：故障 2：离线" json:"status"`
	Type          int       `gorm:"column:type;type:int(11)" json:"type"`
	ProtocolId    int64     `gorm:"column:protocol_id;type:bigint(20)" json:"protocol_id"`
	IsWorking     int       `gorm:"column:is_working;type:tinyint(4);comment:0 正常状态未被使用 1是使用中" json:"is_working"`
	Img           string    `gorm:"column:img;type:varchar(128)" json:"img"`
	OutletInfo    string    `gorm:"column:outlet_info;type:longtext" json:"outlet_info"`
	CarNum        string    `gorm:"column:car_num;type:varchar(255)" json:"car_num"`
	CabinetInfoId int64     `gorm:"column:cabinet_info_id;type:bigint(20);NOT NULL" json:"cabinet_info_id"`
	PublishMobile string    `gorm:"column:publish_mobile;type:varchar(255)" json:"publish_mobile"`
	RecallMobile  string    `gorm:"column:recall_mobile;type:varchar(255)" json:"recall_mobile"`
}

func (m *QldOutlet) TableName() string {
	return "qld_outlet"
}
